package com.cloud.pole.common.vo;

import java.beans.Transient;
import java.util.List;

/**
 * 分页vo
 */
public class PageVo<T> {
    private int page;   //当前页面
    private int limit;  //每页条数
    private long total;  //总条数
    private List<T> rows;//分页数据

    public PageVo(int page, int limit, long total, List rows) {
        this.page = page;
        this.limit = limit;
        this.total = total;
        this.rows = rows;
    }

    public PageVo() {
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    @Transient
    public List<T> getResult() {
        return this.rows;
    }
}
